<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0028)http://jdbi.org/archive.html -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>


<title>abacus-common</title>

<script type="text/javascript" src="./css/ga.js"></script>
<script type="text/javascript">
	if (top.location != self.location)
		top.location.replace(self.location);
</script>

<link href="./css/css" rel="stylesheet" type="text/css"></link>
<link href="./css/css(1)" rel="stylesheet" type="text/css"></link>
<link rel="stylesheet" href="./css/syntax.css" type="text/css"></link>
<link rel="stylesheet" href="./css/screen.css" type="text/css"></link>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-65247258-1', 'auto');
  ga('send', 'pageview');
</script>

</head>
<body>
	<div id="site">
		<h1>
			<a href="./index.html">abacus-common</a> <span id="navigation"> <a href="./docs.html">Docs</a> | <a href="./download.html">Download</a>
				| <a href="./api-docs/index.html">Javadoc</a> | <a href="./faq.html">FAQ</a> | <a href="./community.html">Community</a>
			</span>
		</h1>
	</div>

	<div id="content">

		<div id="page">
		
			<h1>Web Services</h1>
			<p>With <a href="https://en.wikipedia.org/wiki/KISS_principle">KISS principle </a>in mind, abacus-common focus on the rapid web service development for data/logic transfer among servers/clients. 
			(It's recommended to call the service by url: <i>endpoint url + "/" + operation name</i> and define the error code in the response DTOs, instead of identifying call by Http Method or use Http status for application error). 
			Here are the steps to develop web services with abacus-common:</p>
			
			<p></p>
			<li><b>Step 1: Design the interface for your web service and DTOs(Request/Response objects):</b> (which can be <a href="./code-generation.html">generated</a> with (<a href="./dto_def.xml">sample</a>) xml. Refer to <a href="./EntityDefinition.xsd">scheam</a>)</li>
<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008000; font-weight: bold">public</span> <span style="color: #008000; font-weight: bold">interface</span> <span style="color: #0000FF; font-weight: bold">AccountService</span> <span style="color: #666666">{</span>
    <span style="color: #408080; font-style: italic">// The default Http method is POST if the annotation is not configured here.</span>
    <span style="color: #408080; font-style: italic">// And the request url can set to operation name by setRequestByOperatioName(true) in HttpProxy.Config</span>
    <span style="color: #AA22FF">@POST</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;addAccount&quot;</span><span style="color: #666666">)</span>
    AddAccountResponse <span style="color: #0000FF">addAccount</span><span style="color: #666666">(</span>AddAccountRequest request<span style="color: #666666">);</span>

    <span style="color: #408080; font-style: italic">// By default, the request parameters should be wrapped with a DTO object with getter/setter methods.</span>
    <span style="color: #408080; font-style: italic">// Otherwise, Each parameter should be annotated by Field/Path with name.</span>
    <span style="color: #AA22FF">@GET</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;getAccount&quot;</span><span style="color: #666666">)</span>
    GetAccountResponse <span style="color: #0000FF">getAccount</span><span style="color: #666666">(</span><span style="color: #AA22FF">@Field</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;gui&quot;</span><span style="color: #666666">)</span> String gui<span style="color: #666666">);</span>

    <span style="color: #AA22FF">@DELETE</span><span style="color: #666666">(</span><span style="color: #BA2121">&quot;removeAccount&quot;</span><span style="color: #666666">)</span>
    RemoveAccountResponse <span style="color: #0000FF">removeAccount</span><span style="color: #666666">(</span>RemoveAccountRequest request<span style="color: #666666">);</span>
<span style="color: #666666">}</span>
</pre></div>



			<p></p>
			<li><b>Step 2: Implement the interface:</b></li>
<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008000; font-weight: bold">public</span> <span style="color: #008000; font-weight: bold">class</span> <span style="color: #0000FF; font-weight: bold">AccountServiceImpl</span> <span style="color: #008000; font-weight: bold">implements</span> AccountService <span style="color: #666666">{</span>
    <span style="color: #AA22FF">@Override</span>
    <span style="color: #008000; font-weight: bold">public</span> AddAccountResponse <span style="color: #0000FF">addAccount</span><span style="color: #666666">(</span>AddAccountRequest request<span style="color: #666666">)</span> <span style="color: #666666">{</span>
        AddAccountResponse resp <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> AddAccountResponse<span style="color: #666666">();</span>

        <span style="color: #408080; font-style: italic">// Do something...</span>

        <span style="color: #008000; font-weight: bold">return</span> resp<span style="color: #666666">;</span>
    <span style="color: #666666">}</span>

    <span style="color: #AA22FF">@Override</span>
    <span style="color: #008000; font-weight: bold">public</span> GetAccountResponse <span style="color: #0000FF">getAccount</span><span style="color: #666666">(</span>String gui<span style="color: #666666">)</span> <span style="color: #666666">{</span>
        GetAccountResponse resp <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> GetAccountResponse<span style="color: #666666">();</span>

        <span style="color: #408080; font-style: italic">// Do something...</span>

        <span style="color: #008000; font-weight: bold">return</span> resp<span style="color: #666666">;</span>
    <span style="color: #666666">}</span>

    <span style="color: #AA22FF">@Override</span>
    <span style="color: #008000; font-weight: bold">public</span> RemoveAccountResponse <span style="color: #0000FF">removeAccount</span><span style="color: #666666">(</span>RemoveAccountRequest request<span style="color: #666666">)</span> <span style="color: #666666">{</span>
        RemoveAccountResponse resp <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> RemoveAccountResponse<span style="color: #666666">();</span>

        <span style="color: #408080; font-style: italic">// Do something...</span>

        <span style="color: #008000; font-weight: bold">return</span> resp<span style="color: #666666">;</span>
    <span style="color: #666666">}</span>
<span style="color: #666666">}</span>
</pre></div>

			<p></p>
			<li><b>Step 3: Configure servlet for your web service. Here is the sample for tomcat.</b> Both xml and json requests are supported with by same endpoint. Here is a <a href="./web.xml">sample for the web.xml</a></li>
<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #BC7A00">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;web-app</span> <span style="color: #7D9029">version=</span><span style="color: #BA2121">&quot;2.5&quot;</span> <span style="color: #7D9029">xmlns=</span><span style="color: #BA2121">&quot;http://java.sun.com/xml/ns/javaee&quot;</span> <span style="color: #7D9029">xmlns:xsi=</span><span style="color: #BA2121">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
	<span style="color: #7D9029">xsi:schemaLocation=</span><span style="color: #BA2121">&quot;http://java.sun.com/xml/ns/javaee </span>
<span style="color: #BA2121">         http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;display-name&gt;</span>account<span style="color: #008000; font-weight: bold">&lt;/display-name&gt;</span>

	<span style="color: #008000; font-weight: bold">&lt;servlet&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;description&gt;</span>Account Web Service<span style="color: #008000; font-weight: bold">&lt;/description&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;display-name&gt;</span>Account Web Service<span style="color: #008000; font-weight: bold">&lt;/display-name&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;servlet-name&gt;</span>Account<span style="color: #008000; font-weight: bold">&lt;/servlet-name&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;servlet-class&gt;</span>com.landawn.abacus.http.WebServiceServlet<span style="color: #008000; font-weight: bold">&lt;/servlet-class&gt;</span>

		<span style="color: #008000; font-weight: bold">&lt;init-param&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;param-name&gt;</span>serviceImplClass<span style="color: #008000; font-weight: bold">&lt;/param-name&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;param-value&gt;</span>com.landawn.abacus.http.demo.AccountServiceImpl<span style="color: #008000; font-weight: bold">&lt;/param-value&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/init-param&gt;</span>
		
		<span style="color: #408080; font-style: italic">&lt;!-- below url mapper configuration is optional --&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;init-param&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;param-name&gt;</span>urlMapper<span style="color: #008000; font-weight: bold">&lt;/param-name&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;param-value&gt;</span>getAccount=getAccount; addAccount=addAccount<span style="color: #008000; font-weight: bold">&lt;/param-value&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/init-param&gt;</span>
		
		<span style="color: #408080; font-style: italic">&lt;!-- below http method mapper configuration is optional --&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;init-param&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;param-name&gt;</span>httpMethodMapper<span style="color: #008000; font-weight: bold">&lt;/param-name&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;param-value&gt;</span>getAccount=GET, POST; addAccount=POST, PUT<span style="color: #008000; font-weight: bold">&lt;/param-value&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/init-param&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/servlet&gt;</span>

	<span style="color: #008000; font-weight: bold">&lt;servlet-mapping&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;servlet-name&gt;</span>Account<span style="color: #008000; font-weight: bold">&lt;/servlet-name&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;url-pattern&gt;</span>/AccountService/*<span style="color: #008000; font-weight: bold">&lt;/url-pattern&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/servlet-mapping&gt;</span>

<span style="color: #008000; font-weight: bold">&lt;/web-app&gt;</span>
</pre></div>

			
			<p></p>
			<li><b>Step 4: Here is sample of sending request with xml format from the client</b></li>
<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008000; font-weight: bold">static</span> <span style="color: #008000; font-weight: bold">final</span> String url <span style="color: #666666">=</span> <span style="color: #BA2121">&quot;http://localhost:8080/abacus/AccountService&quot;</span><span style="color: #666666">;</span>
<span style="color: #008000; font-weight: bold">static</span> <span style="color: #008000; font-weight: bold">final</span> AccountService xmlAccountService <span style="color: #666666">=</span> HttpProxy<span style="color: #666666">.</span><span style="color: #7D9029">createClientProxy</span><span style="color: #666666">(</span>AccountService<span style="color: #666666">.</span><span style="color: #7D9029">class</span><span style="color: #666666">,</span> ContentFormat<span style="color: #666666">.</span><span style="color: #7D9029">XML</span><span style="color: #666666">,</span> url<span style="color: #666666">);</span>
<span style="color: #408080; font-style: italic">// Or zipped with LZ4:</span>
<span style="color: #408080; font-style: italic">// static final AccountService xmlAccountService = HttpProxy.createClientProxy(AccountService.class, ContentFormat.XML_LZ4, url);</span>

<span style="color: #AA22FF">@Test</span>
<span style="color: #008000; font-weight: bold">public</span> <span style="color: #B00040">void</span> <span style="color: #0000FF">test_addAccount_xml</span><span style="color: #666666">()</span> <span style="color: #666666">{</span>
    AddAccountRequest addRequest <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> AddAccountRequest<span style="color: #666666">();</span>
    addRequest<span style="color: #666666">.</span><span style="color: #7D9029">setAccount</span><span style="color: #666666">(</span>TestUtil<span style="color: #666666">.</span><span style="color: #7D9029">createEntity</span><span style="color: #666666">(</span>Account<span style="color: #666666">.</span><span style="color: #7D9029">class</span><span style="color: #666666">));</span>

    AddAccountResponse addResp <span style="color: #666666">=</span> xmlAccountService<span style="color: #666666">.</span><span style="color: #7D9029">addAccount</span><span style="color: #666666">(</span>addRequest<span style="color: #666666">);</span>
    N<span style="color: #666666">.</span><span style="color: #7D9029">println</span><span style="color: #666666">(</span>addResp<span style="color: #666666">);</span>

    GetAccountResponse getResp <span style="color: #666666">=</span> xmlAccountService<span style="color: #666666">.</span><span style="color: #7D9029">getAccount</span><span style="color: #666666">(</span>addRequest<span style="color: #666666">.</span><span style="color: #7D9029">getAccount</span><span style="color: #666666">().</span><span style="color: #7D9029">getGUI</span><span style="color: #666666">());</span>
    N<span style="color: #666666">.</span><span style="color: #7D9029">println</span><span style="color: #666666">(</span>getResp<span style="color: #666666">);</span>
<span style="color: #666666">}</span>
</pre></div>

<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #408080; font-style: italic">&lt;!-- addAccountRequest with xml --&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;addAccountRequest&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;account&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;account&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;id&gt;</span>634209876<span style="color: #008000; font-weight: bold">&lt;/id&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;gui&gt;</span>ffcc40c5f1fa4bff<span style="color: #008000; font-weight: bold">&lt;/gui&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;emailAddress&gt;</span>175c2304ac224e80<span style="color: #008000; font-weight: bold">&lt;/emailAddress&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;firstName&gt;</span>d5cbcd728923432e<span style="color: #008000; font-weight: bold">&lt;/firstName&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;middleName&gt;</span>d75b0b5befbd46fc<span style="color: #008000; font-weight: bold">&lt;/middleName&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;lastName&gt;</span>39d14d5f85ee4c64<span style="color: #008000; font-weight: bold">&lt;/lastName&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;birthDate&gt;</span>1437010884475<span style="color: #008000; font-weight: bold">&lt;/birthDate&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;status&gt;</span>735955354<span style="color: #008000; font-weight: bold">&lt;/status&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;lastUpdateTime&gt;</span>1437010884475<span style="color: #008000; font-weight: bold">&lt;/lastUpdateTime&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;createTime&gt;</span>1437010884475<span style="color: #008000; font-weight: bold">&lt;/createTime&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/account&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/account&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;/addAccountRequest&gt;</span>

<span style="color: #408080; font-style: italic">&lt;!-- addAccountResponse with xml --&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;addAccountResponse&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;responseCode&gt;</span>0<span style="color: #008000; font-weight: bold">&lt;/responseCode&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;responseMessage&gt;</span>OK<span style="color: #008000; font-weight: bold">&lt;/responseMessage&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;/addAccountResponse&gt;</span>

<span style="color: #408080; font-style: italic">&lt;!-- getAccountResponse with xml --&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;getAccountResponse&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;responseCode&gt;</span>0<span style="color: #008000; font-weight: bold">&lt;/responseCode&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;responseMessage&gt;</span>OK<span style="color: #008000; font-weight: bold">&lt;/responseMessage&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;account&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;account&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;id&gt;</span>634209876<span style="color: #008000; font-weight: bold">&lt;/id&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;gui&gt;</span>ffcc40c5f1fa4bff<span style="color: #008000; font-weight: bold">&lt;/gui&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;emailAddress&gt;</span>175c2304ac224e80<span style="color: #008000; font-weight: bold">&lt;/emailAddress&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;firstName&gt;</span>d5cbcd728923432e<span style="color: #008000; font-weight: bold">&lt;/firstName&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;middleName&gt;</span>d75b0b5befbd46fc<span style="color: #008000; font-weight: bold">&lt;/middleName&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;lastName&gt;</span>39d14d5f85ee4c64<span style="color: #008000; font-weight: bold">&lt;/lastName&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;birthDate&gt;</span>1437010884475<span style="color: #008000; font-weight: bold">&lt;/birthDate&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;status&gt;</span>735955354<span style="color: #008000; font-weight: bold">&lt;/status&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;lastUpdateTime&gt;</span>1437010884475<span style="color: #008000; font-weight: bold">&lt;/lastUpdateTime&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;createTime&gt;</span>1437010884475<span style="color: #008000; font-weight: bold">&lt;/createTime&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/account&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/account&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;/getAccountResponse&gt;</span>
</pre></div>


			<p></p>
			<li><b>Step 5: Or sending request with json format from the client</b></li>
<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008000; font-weight: bold">static</span> <span style="color: #008000; font-weight: bold">final</span> String url <span style="color: #666666">=</span> <span style="color: #BA2121">&quot;http://localhost:8080/abacus/AccountService&quot;</span><span style="color: #666666">;</span>
<span style="color: #008000; font-weight: bold">static</span> <span style="color: #008000; font-weight: bold">final</span> AccountService jsonAccountService <span style="color: #666666">=</span> HttpProxy<span style="color: #666666">.</span><span style="color: #7D9029">createClientProxy</span><span style="color: #666666">(</span>AccountService<span style="color: #666666">.</span><span style="color: #7D9029">class</span><span style="color: #666666">,</span> ContentFormat<span style="color: #666666">.</span><span style="color: #7D9029">JSON</span><span style="color: #666666">,</span> url<span style="color: #666666">);</span>
<span style="color: #408080; font-style: italic">// Or zipped with snappy:</span>
<span style="color: #408080; font-style: italic">// static final AccountService jsonAccountService = HttpProxy.createClientProxy(AccountService.class, ContentFormat.JSON_SNAPPY, url);</span>

<span style="color: #AA22FF">@Test</span>
<span style="color: #008000; font-weight: bold">public</span> <span style="color: #B00040">void</span> <span style="color: #0000FF">test_addAccount_json</span><span style="color: #666666">()</span> <span style="color: #666666">{</span>
    AddAccountRequest addRequest <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> AddAccountRequest<span style="color: #666666">();</span>
    addRequest<span style="color: #666666">.</span><span style="color: #7D9029">setAccount</span><span style="color: #666666">(</span>TestUtil<span style="color: #666666">.</span><span style="color: #7D9029">createEntity</span><span style="color: #666666">(</span>Account<span style="color: #666666">.</span><span style="color: #7D9029">class</span><span style="color: #666666">));</span>

    AddAccountResponse addResp <span style="color: #666666">=</span> jsonAccountService<span style="color: #666666">.</span><span style="color: #7D9029">addAccount</span><span style="color: #666666">(</span>addRequest<span style="color: #666666">);</span>
    N<span style="color: #666666">.</span><span style="color: #7D9029">println</span><span style="color: #666666">(</span>addResp<span style="color: #666666">);</span>

    GetAccountResponse getResp <span style="color: #666666">=</span> jsonAccountService<span style="color: #666666">.</span><span style="color: #7D9029">getAccount</span><span style="color: #666666">(</span>addRequest<span style="color: #666666">.</span><span style="color: #7D9029">getAccount</span><span style="color: #666666">().</span><span style="color: #7D9029">getGUI</span><span style="color: #666666">());</span>
    N<span style="color: #666666">.</span><span style="color: #7D9029">println</span><span style="color: #666666">(</span>getResp<span style="color: #666666">);</span>
<span style="color: #666666">}</span>
</pre></div>

<!-- HTML generated using hilite.me --><div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="border: 1px solid #FF0000">--</span> <span style="border: 1px solid #FF0000">addAccountRequest</span> <span style="border: 1px solid #FF0000">with</span> <span style="border: 1px solid #FF0000">json</span>
{
	<span style="border: 1px solid #FF0000">account:{</span>
		<span style="border: 1px solid #FF0000">id:1450706619,</span>
		<span style="border: 1px solid #FF0000">gui:</span><span style="color: #008000; font-weight: bold">&quot;7c8b7956f34742d0&quot;</span>,
		<span style="border: 1px solid #FF0000">emailAddress:</span><span style="color: #008000; font-weight: bold">&quot;bb22ff882f984eca&quot;</span>,
		<span style="border: 1px solid #FF0000">firstName:</span><span style="color: #008000; font-weight: bold">&quot;37b2d57eb0d64a58&quot;</span>,
		<span style="border: 1px solid #FF0000">middleName:</span><span style="color: #008000; font-weight: bold">&quot;32b0c4b308064aeb&quot;</span>,
		<span style="border: 1px solid #FF0000">lastName:</span><span style="color: #008000; font-weight: bold">&quot;5b98779e6fed406a&quot;</span>,
		<span style="border: 1px solid #FF0000">birthDate:1437011613899,</span>
		<span style="border: 1px solid #FF0000">status:-2064330437,</span>
		<span style="border: 1px solid #FF0000">lastUpdateTime:1437011613899,</span>
		<span style="border: 1px solid #FF0000">createTime:1437011613899</span>
	}
<span style="border: 1px solid #FF0000">}</span>

<span style="border: 1px solid #FF0000">--</span> <span style="border: 1px solid #FF0000">addAccountResponse</span> <span style="border: 1px solid #FF0000">with</span> <span style="border: 1px solid #FF0000">json</span>
{
	<span style="border: 1px solid #FF0000">responseCode:0,</span>
	<span style="border: 1px solid #FF0000">responseMessage:</span><span style="color: #008000; font-weight: bold">&quot;OK&quot;</span>
}

<span style="border: 1px solid #FF0000">--</span> <span style="border: 1px solid #FF0000">getAccountResponse</span> <span style="border: 1px solid #FF0000">with</span> <span style="border: 1px solid #FF0000">json</span>
{
	<span style="border: 1px solid #FF0000">responseCode:0,</span>
	<span style="border: 1px solid #FF0000">responseMessage:</span><span style="color: #008000; font-weight: bold">&quot;OK&quot;</span>,
	<span style="border: 1px solid #FF0000">account:{</span>
		<span style="border: 1px solid #FF0000">id:1450706619,</span>
		<span style="border: 1px solid #FF0000">gui:</span><span style="color: #008000; font-weight: bold">&quot;7c8b7956f34742d0&quot;</span>,
		<span style="border: 1px solid #FF0000">emailAddress:</span><span style="color: #008000; font-weight: bold">&quot;bb22ff882f984eca&quot;</span>,
		<span style="border: 1px solid #FF0000">firstName:</span><span style="color: #008000; font-weight: bold">&quot;37b2d57eb0d64a58&quot;</span>,
		<span style="border: 1px solid #FF0000">middleName:</span><span style="color: #008000; font-weight: bold">&quot;32b0c4b308064aeb&quot;</span>,
		<span style="border: 1px solid #FF0000">lastName:</span><span style="color: #008000; font-weight: bold">&quot;5b98779e6fed406a&quot;</span>,
		<span style="border: 1px solid #FF0000">birthDate:1437011613899,</span>
		<span style="border: 1px solid #FF0000">status:-2064330437,</span>
		<span style="border: 1px solid #FF0000">lastUpdateTime:1437011613899,</span>
		<span style="border: 1px solid #FF0000">createTime:1437011613899</span>
	}
<span style="border: 1px solid #FF0000">}</span>
</pre></div>


		<p></p>		
		<p> There are a lot of additional features supported by <a href="./api-docs/com/landawn/abacus/http/HttpProxy.html">HttpProxy</a>, 
		<a href="./api-docs/com/landawn/abacus/http/Field.html">Field</a>/<a href="./api-docs/com/landawn/abacus/http/Path.html">Path</a>(copied from <a href="http://square.github.io/retrofit/">Retrofit</a>), 
		and refer to <a href="./api-docs/com/landawn/abacus/http/SecurityDTO.html">SecurityDTO</a> for Securtiy request/response.</p>
		<p><a href="http://square.github.io/retrofit/">Retrofit</a> is an excellent framework for Restful Services in Java, recommended to all the java developers.</p>

		</div>

	</div>
</body>

</html>